home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / text / faqs / audio-fmts.part2 < prev    next >
Encoding:
Internet Message Format  |  1994-04-26  |  46.6 KB

  1. Subject: FAQ: Audio File Formats (part 2 of 2)
  2. Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,alt.answers,comp.answers,news.answers
  3. From: guido@cwi.nl (Guido van Rossum)
  4. Date: Mon, 25 Apr 1994 08:17:19 GMT
  5.  
  6. Archive-name: audio-fmts/part2
  7. Submitted-by: Guido van Rossum <guido@cwi.nl>
  8. Version: 3.05
  9. Last-modified: 27-Sep-1993
  10.  
  11. Appendices
  12. ==========
  13.  
  14. Here are some more detailed pieces of info that I received by e-mail.
  15. They are reproduced here virtually without much editing.
  16.  
  17. Table of contents
  18. -----------------
  19.  
  20. FTP access for non-internet sites
  21. AIFF Format (Audio IFF)
  22. The NeXT/Sun audio file format
  23. IFF/8SVX Format
  24. Playing sound on a PC
  25. The EA-IFF-85 documentation
  26. US Federal Standard 1016 availability
  27. Creative Voice (VOC) file format
  28. RIFF WAVE (.WAV) file format
  29. U-LAW and A-LAW definitions
  30. AVR File Format
  31. The Amiga MOD Format
  32.  
  33. ------------------------------------------------------------------------
  34. FTP access for non-internet sites
  35. ---------------------------------
  36.  
  37. From the sci.space FAQ:
  38.  
  39.     Sites not connected to the Internet cannot use FTP directly, but
  40.     there are a few automated FTP servers which operate via email.
  41.     Send mail containing only the word HELP to ftpmail@decwrl.dec.com
  42.     or bitftp@pucc.princeton.edu, and the servers will send you
  43.     instructions on how to make requests.  (The bitftp service is no
  44.     longer available through UUCP gateways due to complaints about
  45.     overuse :-( )
  46.  
  47. Also:
  48.  
  49.     FAQ lists are available by anonymous FTP from rftm.mit.edu
  50.     and by email from mail-server@rtfm.mit.edu (send a message
  51.     containing "help" for instructions about the mail server).
  52.  
  53.  
  54. ------------------------------------------------------------------------
  55. AIFF Format (Audio IFF) and AIFC
  56. --------------------------------
  57.  
  58. This format was developed by Apple for storing high-quality sampled
  59. sound and musical instrument info; it is also used by SGI and several
  60. professional audio packages (sorry, I know no names).  An extension,
  61. called AIFC or AIFF-C, supports compression (see the last item below).
  62.  
  63. I've made a BinHex'ed MacWrite version of the AIFF spec (no idea if
  64. it's the same text as mentioned below) available by anonymous ftp from
  65. ftp.cwi.nl [192.16.184.180]; the file is /pub/audio/AudioIFF1.2.hqx.
  66. A newer version is also available: /pub/audio/AudioIFF1.3.hqx.
  67. But you may be better off with the AIFF-C specs, see below.
  68.  
  69. Mike Brindley (brindley@ece.orst.edu) writes:
  70.  
  71. "The complete AIFF spec by Steve Milne, Matt Deatherage (Apple) is
  72. available in 'AMIGA ROM Kernal Reference Manual: Devices (3rd Edition)'
  73. 1991 by Commodore-Amiga, Inc.; Addison-Wesley Publishing Co.; 
  74. ISBN 0-201-56775-X, starting on page 435 (this edition has a charcoal
  75. grey cover).  It is available in most bookstores, and soon in many
  76. good librairies."
  77.  
  78. According to Mark Callow (msc@sgi.com):
  79.  
  80. A PostScript version of the AIFF-C specification is available via
  81. anonymous ftp on FTP.SGI.COM (192.48.153.1) as /sgi/aiff-c.9.26.91.ps.
  82.  
  83. Benjamin Denckla <bdenckla@husc.harvard.edu> writes:
  84.  
  85. A piece of information that may be of some use to people who want to use
  86. AIFF files with their Macintosh Think C programs:  AIFF data structures are
  87. contained in the file AIFF.h in the "Apple #Includes" folder that comes
  88. on the distribution disks.  I found this out a little too late: I had
  89. already coded my own structures.  I assume that this header file comes
  90. with Apple programming products like MPW [C|C++] as well.
  91.  
  92. An important file format for the Mac which is only mentioned once in the
  93. FAQ is the Sound Designer II file format.  There is also an older Sound
  94. Designer I format.  I have the SDII format in electronic form but I don't
  95. think I'm at liberty to distribute it.  It can be obtained by applying to
  96. become a 3rd Party Developer for Digidesign.  This process is simple
  97. (1-page application) and free.  Call Digidesign at 415-688-0600 for
  98. information.  The SDII file format is interesting in that all non-sample
  99. data (sample rate, channels, etc.) is contained in the resource fork and
  100. the data fork contains sample data only.
  101.  
  102. ------------------------------------------------------------------------
  103. The NeXT/Sun audio file format
  104. ------------------------------
  105.  
  106. Here's the complete story on the file format, from the NeXT
  107. documentation.  (Note that the "magic" number is ((int)0x2e736e64),
  108. which equals ".snd".)  Also, at the end, I've added a litte document
  109. that someone posted to the net a couple of years ago, that describes
  110. the format in a bit-by-bit fashion rather than from C.
  111.  
  112. I received this from Doug Keislar, NeXT Computer.  This is also the
  113. Sun format, except that Sun doesn't recognize as many format codes.  I
  114. added the numeric codes to the table of formats and sorted it.
  115.  
  116.  
  117. SNDSoundStruct:  How a NeXT Computer Represents Sound
  118.  
  119. The NeXT sound software defines the SNDSoundStruct structure to  
  120. represent sound.  This structure defines the soundfile and Mach-O  
  121. sound segment formats and the sound pasteboard type.  It's also used  
  122. to describe sounds in Interface Builder.  In addition, each instance  
  123. of the Sound Kit's Sound class encapsulates a SNDSoundStruct and  
  124. provides methods to access and modify its attributes.
  125.  
  126. Basic sound operations, such as playing, recording, and cut-and-paste  
  127. editing, are most easily performed by a Sound object.  In many cases,  
  128. the Sound Kit obviates the need for in-depth understanding of the  
  129. SNDSoundStruct architecture.  For example, if you simply want to  
  130. incorporate sound effects into an application, or to provide a simple  
  131. graphic sound editor (such as the one in the Mail application), you  
  132. needn't be aware of the details of the SNDSoundStruct.  However, if  
  133. you want to closely examine or manipulate sound data you should be  
  134. familiar with this structure.
  135.  
  136. The SNDSoundStruct contains a header, information that describes the  
  137. attributes of a sound, followed by the data (usually samples) that  
  138. represents the sound.  The structure is defined (in  
  139. sound/soundstruct.h) as:
  140.  
  141. typedef struct {
  142.     int magic;               /* magic number SND_MAGIC */
  143.     int dataLocation;        /* offset or pointer to the data */
  144.     int dataSize;            /* number of bytes of data */
  145.     int dataFormat;          /* the data format code */
  146.     int samplingRate;        /* the sampling rate */
  147.     int channelCount;        /* the number of channels */
  148.     char info[4];            /* optional text information */
  149. } SNDSoundStruct;
  150.  
  151.  
  152.  
  153.  
  154. SNDSoundStruct Fields
  155.  
  156.  
  157.  
  158. magic
  159.  
  160. magic is a magic number that's used to identify the structure as a  
  161. SNDSoundStruct.  Keep in mind that the structure also defines the  
  162. soundfile and Mach-O sound segment formats, so the magic number is  
  163. also used to identify these entities as containing a sound.
  164.  
  165.  
  166.  
  167.  
  168.  
  169. dataLocation
  170.  
  171. It was mentioned above that the SNDSoundStruct contains a header  
  172. followed by sound data.  In reality, the structure only contains the  
  173. header; the data itself is external to, although usually contiguous  
  174. with, the structure.  (Nonetheless, it's often useful to speak of the  
  175. SNDSoundStruct as the header and the data.)  dataLocation is used to  
  176. point to the data.  Usually, this value is an offset (in bytes) from  
  177. the beginning of the SNDSoundStruct to the first byte of sound data.   
  178. The data, in this case, immediately follows the structure, so  
  179. dataLocation can also be thought of as the size of the structure's  
  180. header.  The other use of dataLocation, as an address that locates  
  181. data that isn't contiguous with the structure, is described in  
  182. "Format Codes," below.
  183.  
  184.  
  185.  
  186.  
  187.  
  188. dataSize, dataFormat, samplingRate, and channelCount
  189.  
  190. These fields describe the sound data.
  191.  
  192. dataSize is its size in bytes (not including the size of the  
  193. SNDSoundStruct).
  194.  
  195. dataFormat is a code that identifies the type of sound.  For sampled  
  196. sounds, this is the quantization format.  However, the data can also  
  197. be instructions for synthesizing a sound on the DSP.  The codes are  
  198. listed and explained in "Format Codes," below.
  199.  
  200. samplingRate is the sampling rate (if the data is samples).  Three  
  201. sampling rates, represented as integer constants, are supported by  
  202. the hardware:
  203.  
  204. Constant        Sampling Rate (samples/sec) 
  205.  
  206. SND_RATE_CODEC  8012.821        (CODEC input)
  207. SND_RATE_LOW    22050.0 (low sampling rate output)
  208. SND_RATE_HIGH   44100.0 (high sampling rate output)
  209.  
  210. channelCount is the number of channels of sampled sound.
  211.  
  212.  
  213.  
  214.  
  215.  
  216. info
  217.  
  218. info is a NULL-terminated string that you can supply to provide a  
  219. textual description of the sound.  The size of the info field is set  
  220. when the structure is created and thereafter can't be enlarged.  It's  
  221. at least four bytes long (even if it's unused).
  222.  
  223.  
  224.  
  225.  
  226.  
  227. Format Codes
  228.  
  229. A sound's format is represented as a positive 32-bit integer.  NeXT  
  230. reserves the integers 0 through 255; you can define your own format  
  231. and represent it with an integer greater than 255.  Most of the  
  232. formats defined by NeXT describe the amplitude quantization of  
  233. sampled sound data:
  234.  
  235. Value   Code    Format 
  236.  
  237. 0       SND_FORMAT_UNSPECIFIED  unspecified format 
  238. 1       SND_FORMAT_MULAW_8      8-bit mu-law samples
  239. 2       SND_FORMAT_LINEAR_8     8-bit linear samples
  240. 3       SND_FORMAT_LINEAR_16    16-bit linear samples
  241. 4       SND_FORMAT_LINEAR_24    24-bit linear samples
  242. 5       SND_FORMAT_LINEAR_32    32-bit linear samples
  243. 6       SND_FORMAT_FLOAT        floating-point samples
  244. 7       SND_FORMAT_DOUBLE       double-precision float samples
  245. 8       SND_FORMAT_INDIRECT     fragmented sampled data
  246. 9       SND_FORMAT_NESTED       ?
  247. 10      SND_FORMAT_DSP_CORE     DSP program
  248. 11      SND_FORMAT_DSP_DATA_8   8-bit fixed-point samples
  249. 12      SND_FORMAT_DSP_DATA_16  16-bit fixed-point samples
  250. 13      SND_FORMAT_DSP_DATA_24  24-bit fixed-point samples
  251. 14      SND_FORMAT_DSP_DATA_32  32-bit fixed-point samples
  252. 15      ?
  253. 16      SND_FORMAT_DISPLAY      non-audio display data
  254. 17      SND_FORMAT_MULAW_SQUELCH        ?
  255. 18      SND_FORMAT_EMPHASIZED   16-bit linear with emphasis
  256. 19      SND_FORMAT_COMPRESSED   16-bit linear with compression
  257. 20      SND_FORMAT_COMPRESSED_EMPHASIZED        A combination of the two above
  258. 21      SND_FORMAT_DSP_COMMANDS Music Kit DSP commands
  259. 22      SND_FORMAT_DSP_COMMANDS_SAMPLES         ?
  260. [Some new ones supported by Sun.  This is all I currently know. --GvR]
  261. 23      SND_FORMAT_ADPCM_G721
  262. 24      SND_FORMAT_ADPCM_G722
  263. 25      SND_FORMAT_ADPCM_G723_3
  264. 26      SND_FORMAT_ADPCM_G723_5
  265. 27      SND_FORMAT_ALAW_8
  266.  
  267.  
  268. Most formats identify different sizes and types of  
  269. sampled data.  Some deserve special note:  
  270.  
  271.  
  272. --      SND_FORMAT_DSP_CORE format contains data that represents a  
  273. loadable DSP core program.  Sounds in this format are required by the  
  274. SNDBootDSP() and SNDRunDSP() functions.  You create a  
  275. SND_FORMAT_DSP_CORE sound by reading a DSP load file (extension  
  276. ".lod") with the SNDReadDSPfile() function.
  277.  
  278. --      SND_FORMAT_DSP_COMMANDS is used to distinguish sounds that  
  279. contain DSP commands created by the Music Kit.  Sounds in this format  
  280. can only be created through the Music Kit's Orchestra class, but can  
  281. be played back through the SNDStartPlaying() function.
  282.  
  283. --      SND_FORMAT_DISPLAY format is used by the Sound Kit's  
  284. SoundView class.  Such sounds can't be played.  
  285.  
  286.  
  287. --      SND_FORMAT_INDIRECT indicates data that has become  
  288. fragmented, as described in a separate section, below.  
  289.  
  290.  
  291. --      SND_FORMAT_UNSPECIFIED is used for unrecognized formats.
  292.  
  293.  
  294.  
  295.  
  296.  
  297. Fragmented Sound Data
  298.  
  299. Sound data is usually stored in a contiguous block of memory.   
  300. However, when sampled sound data is edited (such that a portion of  
  301. the sound is deleted or a portion inserted), the data may become  
  302. discontiguous, or fragmented.  Each fragment of data is given its own  
  303. SNDSoundStruct header; thus, each fragment becomes a separate  
  304. SNDSoundStruct structure.  The addresses of these new structures are  
  305. collected into a contiguous, NULL-terminated block; the dataLocation  
  306. field of the original SNDSoundStruct is set to the address of this  
  307. block, while the original format, sampling rate, and channel count  
  308. are copied into the new SNDSoundStructs.  
  309.  
  310.  
  311. Fragmentation serves one purpose:  It avoids the high cost of moving  
  312. data when the sound is edited.  Playback of a fragmented sound is  
  313. transparent-you never need to know whether the sound is fragmented  
  314. before playing it.  However, playback of a heavily fragmented sound  
  315. is less efficient than that of a contiguous sound.  The  
  316. SNDCompactSamples() C function can be used to compact fragmented  
  317. sound data.
  318.  
  319. Sampled sound data is naturally unfragmented.  A sound that's freshly  
  320. recorded or retrieved from a soundfile, the Mach-O segment, or the  
  321. pasteboard won't be fragmented.  Keep in mind that only sampled data  
  322. can become fragmented.
  323.  
  324.  
  325.  
  326. _________________________
  327. >From mentor.cc.purdue.edu!purdue!decwrl!ucbvax!ziploc!eps Wed Apr  4  
  328. 23:56:23 EST 1990
  329. Article 5779 of comp.sys.next:
  330. Path: mentor.cc.purdue.edu!purdue!decwrl!ucbvax!ziploc!eps
  331. >From: eps@toaster.SFSU.EDU (Eric P. Scott)
  332. Newsgroups: comp.sys.next
  333. Subject: Re: Format of NeXT sndfile headers?
  334. Message-ID: <445@toaster.SFSU.EDU>
  335. Date: 31 Mar 90 21:36:17 GMT
  336. References: <14978@phoenix.Princeton.EDU>
  337. Reply-To: eps@cs.SFSU.EDU (Eric P. Scott)
  338. Organization: San Francisco State University
  339. Lines: 42
  340.  
  341. In article <14978@phoenix.Princeton.EDU>
  342.         bskendig@phoenix.Princeton.EDU (Brian Kendig) writes:
  343. >I'd like to take a program I have that converts Macintosh sound  
  344. files
  345. >to NeXT sndfiles and polish it up a bit to go the other direction as
  346. >well.
  347.  
  348. Two people have already submitted programs that do this
  349. (Christopher Lane and Robert Hood); check the various
  350. NeXT archive sites.
  351.  
  352. >       Could someone please give me the format of a NeXT sndfile
  353. >header?
  354.  
  355. "big-endian"
  356.         0       1       2       3
  357.         +-------+-------+-------+-------+
  358. 0       | 0x2e  | 0x73  | 0x6e  | 0x64  |       "magic" number
  359.         +-------+-------+-------+-------+
  360. 4       |                               |       data location
  361.         +-------+-------+-------+-------+
  362. 8       |                               |       data size
  363.         +-------+-------+-------+-------+
  364. 12      |                               |       data format (enum)
  365.         +-------+-------+-------+-------+
  366. 16      |                               |       sampling rate (int)
  367.         +-------+-------+-------+-------+
  368. 20      |                               |       channel count
  369.         +-------+-------+-------+-------+
  370. 24      |       |       |       |       |       (optional) info  
  371. string
  372.  
  373. 28 = minimum value for data location
  374.  
  375. data format values can be found in /usr/include/sound/soundstruct.h
  376.  
  377. Most common combinations:
  378.  
  379.          sampling  channel    data
  380.              rate    count  format              
  381. voice file   8012        1       1 =  8-bit mu-law
  382. system beep 22050        2       3 = 16-bit linear
  383. CD-quality  44100        2       3 = 16-bit linear
  384.  
  385. ------------------------------------------------------------------------
  386. IFF/8SVX Format
  387. ---------------
  388.  
  389. Newsgroups: alt.binaries.sounds.d,alt.sex.sounds
  390. Subject: Format of the IFF header (Amiga sounds)
  391. Message-ID: <2509@tardis.Tymnet.COM>
  392. From: jms@tardis.Tymnet.COM (Joe Smith)
  393. Date: 23 Oct 91 23:54:38 GMT
  394. Followup-To: alt.binaries.sounds.d
  395. Organization: BT North America (Tymnet)
  396.  
  397. The first 12 bytes of an IFF file are used to distinguish between an Amiga
  398. picture (FORM-ILBM), an Amiga sound sample (FORM-8SVX), or other file
  399. conforming to the IFF specification.  The middle 4 bytes is the count of
  400. bytes that follow the "FORM" and byte count longwords.  (Numbers are stored
  401. in M68000 form, high order byte first.)
  402.  
  403.                 ------------------------------------------
  404.  
  405. FutureSound audio file, 15000 samples at 10.000KHz, file is 15048 bytes long.
  406.  
  407. 0000: 464F524D 00003AC0 38535658 56484452    FORM..:.8SVXVHDR
  408.       F O R M     15040 8 S V X  V H D R
  409. 0010: 00000014 00003A98 00000000 00000000    ......:.........
  410.             20    15000        0        0
  411. 0020: 27100100 00010000 424F4459 00003A98    '.......BODY..:.
  412.      10000 1 0    1.0   B O D Y     15000
  413.  
  414. 0000000..03 = "FORM", identifies this as an IFF format file.
  415. FORM+00..03 (ULONG) = number of bytes that follow.  (Unsigned long int.)
  416. FORM+03..07 = "8SVX", identifies this as an 8-bit sampled voice.
  417.  
  418. ????+00..03 = "VHDR", Voice8Header, describes the parameters for the BODY.
  419. VHDR+00..03 (ULONG) = number of bytes to follow. 
  420. VHDR+04..07 (ULONG) = samples in the high octave 1-shot part.
  421. VHDR+08..0B (ULONG) = samples in the high octave repeat part.
  422. VHDR+0C..0F (ULONG) = samples per cycle in high octave (if repeating), else 0.
  423. VHDR+10..11 (UWORD) = samples per second.  (Unsigned 16-bit quantity.)
  424. VHDR+12     (UBYTE) = number of octaves of waveforms in sample.
  425. VHDR+13     (UBYTE) = data compression (0=none, 1=Fibonacci-delta encoding).
  426. VHDR+14..17 (FIXED) = volume.  (The number 65536 means 1.0 or full volume.)
  427.  
  428. ????+00..03 = "BODY", identifies the start of the audio data.
  429. BODY+00..03 (ULONG) = number of bytes to follow.
  430. BODY+04..NNNNN      = Data, signed bytes, from -128 to +127.
  431.  
  432. 0030: 04030201 02030303 04050605 05060605
  433. 0040: 06080806 07060505 04020202 01FF0000
  434. 0050: 00000000 FF00FFFF FFFEFDFD FDFEFFFF
  435. 0060: FDFDFF00 00FFFFFF 00000000 00FFFF00
  436. 0070: 00000000 00FF0000 00FFFEFF 00000000
  437. 0080: 00010000 000101FF FF0000FE FEFFFFFE
  438. 0090: FDFDFEFD FDFFFFFC FDFEFDFD FEFFFEFE
  439. 00A0: FFFEFEFE FEFEFEFF FFFFFEFF 00FFFF01
  440.  
  441. This small section of the audio sample shows the number ranging from -5 (0xFD)
  442. to +8 (0x08).  Warning: Do not assume that the BODY starts 48 bytes into the
  443. file.  In addition to "VHDR", chunks labeled "NAME", "AUTH", "ANNO", or 
  444. "(c) " may be present, and may be in any order.  You will have to check the
  445. byte count in each chunk to determine how many bytes to skip.
  446.  
  447. ------------------------------------------------------------------------
  448. Playing sound on a PC
  449. ---------------------
  450.  
  451. From: Eric A Rasmussen
  452.  
  453. Any turbo PC (8088 at 8 Mhz or greater)/286/386/486/etc. can produce a quality
  454. playback of single channel 8 bit sounds on the internal (1 bit, 1 channel)
  455. speaker by utilizing Pulse-Width-Modulation, which toggles the speaker faster
  456. than it can physically move to simulate positions between fully on and fully
  457. off.  There are several PD programs of this nature that I know of:
  458.  
  459. REMAC  - Plays MAC format sound files.  Files on the Macintosh, at least the
  460.          sound files that I've ripped apart, seem to contain 3 parts.  The
  461.          first two are info like what the file icon looks like and other
  462.          header type info.  The third part contains the raw sample data, and
  463.          it is this portion of the file which is saved to a seperate file,
  464.          often named with the .snd extension by PC users.  Personally, I like
  465.          to name the files .s1, .s2, .s3, or .s4 to indicate the sampling rate
  466.          of the file. (-s# is how to specify the playback rate in REMAC.)
  467.          REMAC provides playback rates of 5550hz, 7333hz, 11 khz, & 22 khz.
  468. REMAC2 - Same as REMAC, but sounds better on higher speed machines.
  469. REPLAY - Basically same as REMAC, but for playback of Atari ST sounds. 
  470.          Apparently, the Atari has two sound formats, one of which sounds like
  471.          garbage if played by REMAC or REPLAY in the incorrect mode.  The
  472.          other file format works fine with REMAC and so appears to be 'normal'
  473.          unsigned 8-bit data.  REPLAY provides playback rates of 11.5 khz,
  474.          12.5 khz, 14 khz, 16 khz, 18.5 khz, 22khz, & 27 khz.
  475.  
  476. These three programs are all by the same author, Richard E. Zobell who does
  477. not have an internet mail address to my knowledge, but does have a GEnie email
  478. address of R.ZOBELL. 
  479.  
  480. Additionally, there are various stand-alone demos which use the internal
  481. speaker, of which there is one called mushroom which plays a 30 second
  482. advertising jingle for magic mushroom room deoderizers which is pretty
  483. humerous.  I've used this player to playback samples that I ripped out of the
  484. commercial game program Mean Streets, which uses something they call RealSound
  485. (tm) to playback digital samples on the internal speaker. (Of course, I only do
  486. this on my own system, and since I own the game, I see no problems with it.)
  487.  
  488. For owners of 8 Mhz 286's and above, the option to play 4 channel 8 bit sounds
  489. (with decent quality) on the internal speaker is also a reality.  Quite a
  490. number of PD programs exist to do this, including, but not limited to:
  491.  
  492. ModEdit, ModPlay, ScreamTracker, STM, Star Trekker, Tetra, and probably a few
  493. more.  
  494.  
  495. All these programs basically make use of various sound formats used by the
  496. Amiga line of computers.  These include .stm files, .mod files
  497. [a.k.a. mod. files], and .nst files [really the same hing].  Also,
  498. these programs pretty much all have the option to playback the 
  499. sound to add-on hardware such as the SoundBlaster card, the Covox series of
  500. devices, and also to direct the data to either one or two (for stereo)
  501. parallel ports, which you could attach your own D/A's to.  (From what I have
  502. seen, the Covox is basically an small amplified speaker with a D/A which plugs
  503. into the parallel port.  This sounds very similiar to the Disney Sound System
  504. (DSS) which people have been talking about recently.)  
  505.  
  506. ------------------------------------------------------------------------
  507. The EA-IFF-85 documentation
  508. ---------------------------
  509.  
  510. From: dgc3@midway.uchicago.edu
  511.  
  512. As promised, here's an ftp location for the EA-IFF-85 documentation.  It's
  513. the November 1988 release as revised by Commodore (the last public release),
  514. with specifications for IFF FORMs for graphics, sound, formatted text, and
  515. more.  IFF FORMS now exist for other media, including structured drawing, and
  516. new documentation is now available only from Commodore.
  517.  
  518. The documentation is at grind.isca.uiowa.edu [128.255.19.233], in the
  519. directory /amiga/f1/ff185.  The complete file list is as follows:
  520.  
  521. DOCUMENTS.zoo    
  522. EXAMPLES.zoo     
  523. EXECUTABLE.zoo   
  524. INCLUDE.zoo      
  525. LINKER_INFO.zoo  
  526. OBJECT.zoo       
  527. SOURCE.zoo       
  528. TP_IFF_Specs.zoo 
  529.  
  530. All files except DOCUMENTS.zoo are Amiga-specific, but may be used as a basis
  531. for conversion to other platforms.  Well, I take that tentatively back.  I
  532. don't know what TP_IFF_Specs.zoo contains, so it might be non-Amiga-specific.
  533.  
  534. ------------------------------------------------------------------------
  535. US Federal Standard 1016 availability
  536. -------------------------------------
  537.  
  538. From: jpcampb@afterlife.ncsc.mil (Joe Campbell)
  539.  
  540. The U.S. DoD's Federal-Standard-1016 based 4800 bps code excited linear
  541. prediction voice coder version 3.2 (CELP 3.2) Fortran and C simulation
  542. source codes are available for worldwide distribution (on DOS
  543. diskettes, but configured to compile on Sun SPARC stations) from NTIS
  544. and DTIC.  Example input and processed speech files are included.  A
  545. Technical Information Bulletin (TIB), "Details to Assist in
  546. Implementation of Federal Standard 1016 CELP," and the official
  547. standard, "Federal Standard 1016, Telecommunications:  Analog to
  548. Digital Conversion of Radio Voice by 4,800 bit/second Code Excited
  549. Linear Prediction (CELP)," are also available.
  550.  
  551. This is available through the National Technical Information Service:
  552.  
  553. NTIS
  554. U.S. Department of Commerce
  555. 5285 Port Royal Road
  556. Springfield, VA  22161
  557. USA
  558. (703) 487-4650
  559.  
  560. The "AD" ordering number for the CELP software is AD M000 118
  561. (US$ 90.00) and for the TIB it's AD A256 629 (US$ 17.50).  The LPC-10
  562. standard, described below, is FIPS Pub 137 (US$ 12.50).  There is a
  563. $3.00 shipping charge on all U.S. orders.  The telephone number for
  564. their automated system is 703-487-4650, or 703-487-4600 if you'd prefer
  565. to talk with a real person.
  566.  
  567. (U.S. DoD personnel and contractors can receive the package from the
  568. Defense Technical Information Center:  DTIC, Building 5, Cameron
  569. Station, Alexandria, VA 22304-6145.  Their telephone number is
  570. 703-274-7633.)
  571.  
  572. The following articles describe the Federal-Standard-1016 4.8-kbps CELP
  573. coder (it's unnecessary to read more than one):
  574.  
  575. Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch,
  576. "The Federal Standard 1016 4800 bps CELP Voice Coder," Digital Signal
  577. Processing, Academic Press, 1991, Vol. 1, No. 3, p. 145-155.
  578.  
  579. Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch,
  580. "The DoD 4.8 kbps Standard (Proposed Federal Standard 1016),"
  581. in Advances in Speech Coding, ed. Atal, Cuperman and Gersho,
  582. Kluwer Academic Publishers, 1991, Chapter 12, p. 121-133.
  583.  
  584. Campbell, Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, "The
  585. Proposed Federal Standard 1016 4800 bps Voice Coder:  CELP," Speech
  586. Technology Magazine, April/May 1990, p. 58-64.
  587.  
  588.  
  589. The U.S. DoD's Federal-Standard-1015/NATO-STANAG-4198 based 2400 bps
  590. linear prediction coder (LPC-10) was republished as a Federal
  591. Information Processing Standards Publication 137 (FIPS Pub 137).
  592. It is described in:
  593.  
  594. Thomas E. Tremain, "The Government Standard Linear Predictive Coding
  595. Algorithm:  LPC-10," Speech Technology Magazine, April 1982, p. 40-49.
  596.  
  597. There is also a section about FS-1015 in the book:
  598. Panos E. Papamichalis, Practical Approaches to Speech Coding,
  599. Prentice-Hall, 1987.
  600.  
  601. The voicing classifier used in the enhanced LPC-10 (LPC-10e) is described in:
  602. Campbell, Joseph P., Jr. and T. E. Tremain, "Voiced/Unvoiced Classification
  603. of Speech with Applications to the U.S. Government LPC-10E Algorithm,"
  604. Proceedings of the IEEE International Conference on Acoustics, Speech, and
  605. Signal Processing, 1986, p. 473-6.
  606.  
  607. Copies of the official standard
  608. "Federal Standard 1016, Telecommunications: Analog to Digital Conversion
  609. of Radio Voice by 4,800 bit/second Code Excited Linear Prediction (CELP)"
  610. are available for US$ 5.00 each from:
  611.  
  612. GSA Federal Supply Service Bureau
  613. Specification Section, Suite 8100
  614. 470 E. L'Enfant Place, S.W.
  615. Washington, DC  20407
  616. (202)755-0325
  617.  
  618. Realtime DSP code for FS-1015 and FS-1016 is sold by:
  619.  
  620. John DellaMorte
  621. DSP Software Engineering
  622. 165 Middlesex Tpk, Suite 206
  623. Bedford, MA  01730
  624. USA
  625. 1-617-275-3733
  626. 1-617-275-4323 (fax)
  627. dspse.bedford@channel1.com
  628.  
  629. DSP Software Engineering's FS-1016 code can run on a DSP Research's Tiger 30
  630. (a PC board with a TMS320C3x and analog interface suited to development work).
  631.  
  632. DSP Research                
  633. 1095 E. Duane Ave.          
  634. Sunnyvale, CA  94086        
  635. USA
  636. (408)773-1042               
  637. (408)736-3451 (fax)         
  638.  
  639. From: cfreese@super.org (Craig F. Reese)
  640. Newsgroups: comp.speech,comp.dsp,comp.compression.research
  641. Subject: CELP 3.2a release now available
  642. Organization: Supercomputing Research Center (Bowie, MD)
  643. Date: Tue, 3 Aug 1993 14:55:25 GMT
  644.  
  645. 3 August 1993
  646.  
  647. CELP 3.2a Release
  648.  
  649. Dear CELPers,
  650.  
  651. We have placed an updated version of the FS-1016 CELP 3.2 code in the
  652. anonymous FTP area on super.org (192.31.192.1).  It's in:
  653.  
  654.   /pub/celp_3.2a.tar.Z (please be sure to do the ftp in binary mode).
  655.  
  656. This is essentially the PC release that was on fumar, except that we
  657. started directly from the PC disks.  The value added is that we have
  658. made over 69 corrections and fixes.  Most of these were necessary
  659. because of the 8 character file name limit on DOS, but there are some
  660. others, as well.
  661.  
  662. The code (C, FORTRAN, diskio) all has been built and tested on a Sun4
  663. under SunOS4.1.3.  If you want to run it somewhere else, then you may
  664. have to do a bit of work.  (A Solaris 2.x-compatible release is
  665. planned soon.)
  666.  
  667. [One note to PCers.  The files:
  668. [
  669. [       cbsearch.F celp.F csub.F mexcite.F psearch.F
  670. [
  671. [are meant to be passed through the C preprocessor (cpp).
  672. [We gather that DOS (or whatever it's called) can't distinguish 
  673. [the .F from a .f.  Be careful!
  674.  
  675. Very limited support is available from the authors (Joe, et al.).
  676. Please do not send questions or suggestions without first reading the
  677. documentation (README files, the Technical Information Bulletin, etc.).
  678. The authors would enjoy hearing from you, but they have limited time
  679. for support and would like to use it as efficiently as possible.  They
  680. welcome bug reports, but, again, please read the documentation first.
  681. All users of FS-1016 CELP software are strongly encouraged to acquire
  682. the latest release (version 3.2a as of this writing).
  683.  
  684. We do not know how long we will be able to leave the software on this
  685. site, but it should be _at_least_ through 1 October 1993 (if you find
  686. it missing, please drop me (Craig) a note).  Please try to get the
  687. software during off hours (8 p.m. - 7 a.m. Eastern Standard time) or
  688. folks here might complain and we'll have to get rid of the code (if
  689. that happens, we'll try to pass it on to someone else, who can put it
  690. on the net).  We would be more than happy for someone to copy it and
  691. make it available elsewhere.
  692.  
  693. Good Luck,
  694.  
  695. Craig F. Reese  (cfreese@super.org)
  696. IDA/Supercomputing Research Center
  697.  
  698. Joe Campbell (jpcampb@afterlife.ncsc.mil)
  699. Department of Defense
  700.  
  701. P.S.  Just so you all know, I (Craig) am not actually involved in
  702. CELP work.  I mainly got with Joe to help make the software available
  703. on the Internet.  In the course of doing so, I cleaned up much of it,
  704. but I am not, by any stretch, a CELP expert and will most likely
  705. be unable to answer any technical questions concerning it. ;^)
  706.  
  707. From: tobiasr@monolith.lrmsc.loral.com (Richard Tobias)
  708.  
  709. For U.S. FED-STD-1016 (4800 bps CELP) _realtime_ DSP code and
  710. information about products using this code using the AT&T DSP32C and
  711. AT&T DSP3210, contact:
  712.  
  713. White Eagle Systems Technology, Inc.
  714. 1123 Queensbridge Way
  715. San Jose, CA 95120
  716. (408) 997-2706
  717. (408) 997-3584 (fax)
  718. rjjt@netcom.com
  719.  
  720. From: Cole Erskine <cole@analogical.com>
  721.  
  722. [paraphrased]
  723.  
  724. Analogical Systems has a _real-time_ multirate implementation of U.S.
  725. Federal Standard 1016 CELP operating at bit rates of 4800, 7200, and
  726. 9600 bps on a single 27MHz Motorola DSP56001. Source and object code
  727. is available for a one-time license fee.
  728.  
  729. FREE, _real-time_ demonstration software for the Ariel PC-56D is
  730. available for those who already have such a board by contacting
  731. Analogical Systems.  The demo software allows you to record and
  732. playback CELP files to and from the PC's hard disk.
  733.  
  734. Analogical Systems
  735. 2916 Ramona Street
  736. Palo Alto, CA 94306
  737. Tel: +1 (415) 323-3232
  738. FAX: +1 (415) 323-4222
  739.  
  740. ------------------------------------------------------------------------
  741. Creative Voice (VOC) file format
  742. --------------------------------
  743.  
  744. From: galt@dsd.es.com
  745.  
  746. (byte numbers are hex!)
  747.  
  748.     HEADER (bytes 00-19)
  749.     Series of DATA BLOCKS (bytes 1A+) [Must end w/ Terminator Block]
  750.  
  751. - ---------------------------------------------------------------
  752.  
  753. HEADER:
  754. =======
  755.      byte #     Description
  756.      ------     ------------------------------------------
  757.      00-12      "Creative Voice File"
  758.      13         1A (eof to abort printing of file)
  759.      14-15      Offset of first datablock in .voc file (std 1A 00
  760.                 in Intel Notation)
  761.      16-17      Version number (minor,major) (VOC-HDR puts 0A 01)
  762.      18-19      2's Comp of Ver. # + 1234h (VOC-HDR puts 29 11)
  763.  
  764. - ---------------------------------------------------------------
  765.  
  766. DATA BLOCK:
  767. ===========
  768.  
  769.    Data Block:  TYPE(1-byte), SIZE(3-bytes), INFO(0+ bytes)
  770.    NOTE: Terminator Block is an exception -- it has only the TYPE byte.
  771.  
  772.       TYPE   Description     Size (3-byte int)   Info
  773.       ----   -----------     -----------------   -----------------------
  774.       00     Terminator      (NONE)              (NONE)
  775.       01     Sound data      2+length of data    *
  776.       02     Sound continue  length of data      Voice Data
  777.       03     Silence         3                   **
  778.       04     Marker          2                   Marker# (2 bytes)
  779.       05     ASCII           length of string    null terminated string
  780.       06     Repeat          2                   Count# (2 bytes)
  781.       07     End repeat      0                   (NONE)
  782.       08     Extended        4                   ***
  783.  
  784.       *Sound Info Format:       **Silence Info Format:
  785.        ---------------------      ----------------------------
  786.        00   Sample Rate           00-01  Length of silence - 1
  787.        01   Compression Type      02     Sample Rate
  788.        02+  Voice Data
  789.  
  790.     ***Extended Info Format:
  791.        ---------------------
  792.        00-01  Time Constant: Mono: 65536 - (256000000/sample_rate)
  793.                              Stereo: 65536 - (25600000/(2*sample_rate))
  794.        02     Pack
  795.        03     Mode: 0 = mono
  796.                     1 = stereo
  797.  
  798.  
  799.   Marker#           -- Driver keeps the most recent marker in a status byte
  800.   Count#            -- Number of repetitions + 1
  801.                          Count# may be 1 to FFFE for 0 - FFFD repetitions
  802.                          or FFFF for endless repetitions
  803.   Sample Rate       -- SR byte = 256-(1000000/sample_rate)
  804.   Length of silence -- in units of sampling cycle
  805.   Compression Type  -- of voice data
  806.                          8-bits    = 0
  807.                          4-bits    = 1
  808.                          2.6-bits  = 2
  809.                          2-bits    = 3
  810.                          Multi DAC = 3+(# of channels) [interesting--
  811.                                        this isn't in the developer's manual]
  812.  
  813. ------------------------------------------------------------------------
  814. RIFF WAVE (.WAV) file format
  815. ----------------------------
  816.  
  817. RIFF is a format by Microsoft and IBM which is similar in spirit and
  818. functionality as EA-IFF-85, but not compatible (and it's in
  819. little-endian byte order, of course :-).  WAVE is RIFF's equivalent of
  820. AIFF, and its inclusion in Microsoft Windows 3.1 has suddenly made it
  821. important to know about.
  822.  
  823. Rob Ryan was kind enough to send me a description of the RIFF format.
  824. Unfortunately, it is too big to include here (27 k), but I've made it
  825. available for anonymous ftp as ftp.cwi.nl:/pub/audio/RIFF-format.
  826.  
  827. And here's a pointer to the official description from Matt Saettler,
  828. Microsoft Multimedia:
  829.  
  830. "The complete definition of the WAVE file format as defined by
  831. IBM/Microsoft is available for anon. FTP from ftp.uu.net in the
  832. vendor/microsoft/multimedia directory."
  833.  
  834. (Rob Ryan's version may actually be an extract from one of the files
  835. stored there.)
  836.  
  837. ------------------------------------------------------------------------
  838. U-LAW and A-LAW definitions
  839. ---------------------------
  840.  
  841. [Adapted from information provided by duggan@cc.gatech.edu (Rick
  842. Duggan) and davep@zenobia.phys.unsw.EDU.AU (David Perry)]
  843.  
  844. u-LAW (really mu-LAW) is
  845.  
  846.           sgn(m)   (     |m |)       |m |
  847.    y=    ------- ln( 1+ u|--|)       |--| =< 1
  848.          ln(1+u)   (     |mp|)       |mp|         
  849.  
  850. A-LAW is
  851.  
  852.      |     A    (m )                 |m |    1
  853.      |  ------- (--)                 |--| =< - 
  854.      |  1+ln A  (mp)                 |mp|    A     
  855.    y=|
  856.      | sgn(m) (        |m |)    1    |m |
  857.      | ------ ( 1+ ln A|--|)    - =< |--| =< 1
  858.      | 1+ln A (        |mp|)    A    |mp|         
  859.  
  860. Values of u=100 and 255, A=87.6, mp is the Peak message value, m is
  861. the current quantised message value.  (The formulae get simpler if you
  862. substitute x for m/mp and sgn(x) for sgn(m); then -1 <= x <= 1.)
  863.  
  864. Converting from u-LAW to A-LAW is in a sense "lossy" since there are
  865. quantizing errors introduced in the conversion.
  866.  
  867. "..the u-LAW used in North America and Japan, and the
  868. A-LAW used in Europe and the rest of the world and
  869. international routes.."
  870.  
  871. References:
  872.  
  873. Modern Digital and Analog Communication Systems, B.P.Lathi., 2nd ed.
  874. ISBN 0-03-027933-X
  875.  
  876. Transmission Systems for Communications
  877. Fifth Edition
  878. by Members of the Technical Staff at Bell Telephone Laboratories
  879. Bell Telephone Laboratories, Incorporated
  880. Copyright 1959, 1964, 1970, 1982
  881.  
  882. A note on the resolution of U-LAW by Frank Klemm <pfk@rz.uni-jena.de>:
  883.  
  884. 8 bit U-LAW has the same lowest  magnitude like 12 bit linear and 12 bit
  885. U-LAW like 16 linear.
  886.  
  887. Device/Coding   Resolution              Resolution
  888.                 on maximal level        on low level
  889.  8 bit linear    8                       8
  890.  8 bit ulaw      6                      12      (used for digital telephone)
  891. 12 bit linear   12                      12
  892. 12 bit ulaw     10                      16      (used in DAT/Longplay)
  893. 16 bit linear   16                      16
  894.  
  895. estimated for some analoge technique:
  896. tape recorder (HiFi DIN)
  897.                  8                       9      (no Problem today)
  898. tape recorder (semiprofessional)
  899.                 10.5                    13.5 
  900.  
  901. ------------------------------------------------------------------------
  902. AVR File Format
  903. ---------------
  904.  
  905. From: hyc@hanauma.Jpl.Nasa.Gov (Howard Chu)
  906.  
  907. A lot of PD software exists to play Mac .snd files on the ST. One other
  908. format that seems pretty popular (used by a number of commercial packages)
  909. is the AVR format (from Audio Visual Research). This format has a 128 byte
  910. header that looks like this:
  911.  
  912.         char magic[4]="2BIT";
  913.         char name[8];           /* null-padded sample name */
  914.         short mono;             /* 0 = mono, 0xffff = stereo */
  915.         short rez;              /* 8 = 8 bit, 16 = 16 bit */
  916.         short sign;             /* 0 = unsigned, 0xffff = signed */
  917.         short loop;             /* 0 = no loop, 0xffff = looping sample */
  918.         short midi;             /* 0xffff = no MIDI note assigned,
  919.                                    0xffXX = single key note assignment
  920.                                    0xLLHH = key split, low/hi note */
  921.         long rate;              /* sample frequency in hertz */
  922.         long size;              /* sample length in bytes or words (see rez) */
  923.         long lbeg;              /* offset to start of loop in bytes or words.
  924.                                    set to zero if unused. */
  925.         long lend;              /* offset to end of loop in bytes or words.
  926.                                    set to sample length if unused. */
  927.         short res1;             /* Reserved, MIDI keyboard split */
  928.         short res2;             /* Reserved, sample compression */
  929.         short res3;             /* Reserved */
  930.         char ext[20];           /* Additional filename space, used
  931.                                    if (name[7] != 0) */
  932.         char user[64];          /* User defined. Typically ASCII message. */
  933.  
  934. -----------------------------------------------------------------------
  935. The Amiga MOD Format
  936. --------------------
  937.  
  938. From: norlin@mailhost.ecn.uoknor.edu (Norman Lin)
  939.  
  940. MOD files are music files containing 2 parts:
  941.  
  942. (1) a bank of digitized samples
  943. (2) sequencing information describing how and when to play the samples
  944.  
  945. MOD files originated on the Amiga, but because of their flexibility
  946. and the extremely large number of MOD files available, MOD players
  947. are now available for a variety of machines (IBM PC, Mac, Sparc
  948. Station, etc.)
  949.  
  950. The samples in a MOD file are raw, 8 bit, signed, headerless, linear
  951. digital data.  There may be up to 31 distinct samples in a MOD file,
  952. each with a length of up to 128K (though most are much smaller; say,
  953. 10K - 60K).  An older MOD format only allowed for up to 15 samples in
  954. a MOD file; you don't see many of these anymore.  There is no standard
  955. sampling rate for these samples.  [But see below.]
  956.  
  957. The sequencing information in a MOD file contains 4 tracks of
  958. information describing which, when, for how long, and at what frequency
  959. samples should be played.  This means that a MOD file can have up
  960. to 31 distinct (digitized) instrument sounds, with up to 4 playing
  961. simultaneously at any given point.  This allows a wide variety
  962. of orchestrational possibilities, including use of voice samples
  963. or creation of one's own instruments (with appropriate sampling
  964. hardware/software).  The ability to use one's own samples as instruments
  965. is a flexibility that other music files/formats do not share, and
  966. is one of the reasons MOD files are so popular, numerous, and diverse.
  967.  
  968. 15 instrument MODs, as noted above, are somewhat older than 31
  969. instrument MODs and are not (at least not by me) seen very often
  970. anymore.  Their format is identical to that of 31 instrument MODs
  971. except:
  972.  
  973. (1) Since there are only 15 samples, the information for the last (15th)
  974.     sample starts at byte 440 and goes through byte 469.
  975. (2) The songlength is at byte 470 (contrast with byte 950 in 31 instrument
  976.     MOD)
  977. (3) Byte 471 appears to be ignored, but has been observed to be 127.
  978.     (Sorry, this is from observation only)
  979. (4) Byte 472 begins the pattern sequence table (contrast with byte 952
  980.     in a 31 instrument MOD)
  981. (5) Patterns start at byte 600 (contrast with byte 1084 in 31 instrument MOD)
  982.  
  983. "ProTracker," an Amiga MOD file creator/editor, is available for ftp
  984. everywhere as pt??.lzh.
  985.  
  986. From: Apollo Wong <apollo@ee.ualberta.ca>
  987.  
  988. From: M.J.H.Cox@bradford.ac.uk (Mark Cox)
  989. Newsgroups: alt.sb.programmer
  990. Subject: Re: Format for MOD files...
  991. Message-ID: <1992Mar18.103608.4061@bradford.ac.uk>
  992. Date: 18 Mar 92 10:36:08 GMT
  993. Organization: University of Bradford, UK
  994.  
  995. wdc50@DUTS.ccc.amdahl.com (Winthrop D Chan) writes:
  996. >I'd like to know if anyone has a reference document on the format of the
  997. >Amiga Sound/NoiseTracker (MOD) files. The author of Modplay said he was going
  998. >to release such a document sometime last year, but he never did. If anyone
  999.  
  1000. I found this one, which covers it better than I can explain it - if you
  1001. use this in conjunction with the documentation that comes with Norman
  1002. Lin's Modedit program it should pretty much cover it.
  1003.  
  1004. Mark J Cox
  1005.  
  1006. /***********************************************************************
  1007.  
  1008. Protracker 1.1B Song/Module Format:
  1009. -----------------------------------
  1010.  
  1011. Offset  Bytes  Description
  1012. ------  -----  -----------
  1013.    0     20    Songname. Remember to put trailing null bytes at the end...
  1014.  
  1015. Information for sample 1-31:
  1016.  
  1017. Offset  Bytes  Description
  1018. ------  -----  -----------
  1019.   20     22    Samplename for sample 1. Pad with null bytes.
  1020.   42      2    Samplelength for sample 1. Stored as number of words.
  1021.                Multiply by two to get real sample length in bytes.
  1022.   44      1    Lower four bits are the finetune value, stored as a signed
  1023.                four bit number. The upper four bits are not used, and
  1024.                should be set to zero.
  1025.                Value:  Finetune:
  1026.                  0        0
  1027.                  1       +1
  1028.                  2       +2
  1029.                  3       +3
  1030.                  4       +4
  1031.                  5       +5
  1032.                  6       +6
  1033.                  7       +7
  1034.                  8       -8
  1035.                  9       -7
  1036.                  A       -6
  1037.                  B       -5
  1038.                  C       -4
  1039.                  D       -3
  1040.                  E       -2
  1041.                  F       -1
  1042.  
  1043.   45      1    Volume for sample 1. Range is $00-$40, or 0-64 decimal.
  1044.   46      2    Repeat point for sample 1. Stored as number of words offset
  1045.                from start of sample. Multiply by two to get offset in bytes.
  1046.   48      2    Repeat Length for sample 1. Stored as number of words in
  1047.                loop. Multiply by two to get replen in bytes.
  1048.  
  1049. Information for the next 30 samples starts here. It's just like the info for
  1050. sample 1.
  1051.  
  1052. Offset  Bytes  Description
  1053. ------  -----  -----------
  1054.   50     30    Sample 2...
  1055.   80     30    Sample 3...
  1056.    .
  1057.    .
  1058.    .
  1059.  890     30    Sample 30...
  1060.  920     30    Sample 31...
  1061.  
  1062. Offset  Bytes  Description
  1063. ------  -----  -----------
  1064.  950      1    Songlength. Range is 1-128.
  1065.  951      1    Well... this little byte here is set to 127, so that old
  1066.                trackers will search through all patterns when loading.
  1067.                Noisetracker uses this byte for restart, but we don't.
  1068.  952    128    Song positions 0-127. Each hold a number from 0-63 that
  1069.                tells the tracker what pattern to play at that position.
  1070. 1080      4    The four letters "M.K." - This is something Mahoney & Kaktus
  1071.                inserted when they increased the number of samples from
  1072.                15 to 31. If it's not there, the module/song uses 15 samples
  1073.                or the text has been removed to make the module harder to
  1074.                rip. Startrekker puts "FLT4" or "FLT8" there instead.
  1075.  
  1076. Offset  Bytes  Description
  1077. ------  -----  -----------
  1078. 1084    1024   Data for pattern 00.
  1079.    .
  1080.    .
  1081.    .
  1082. xxxx  Number of patterns stored is equal to the highest patternnumber
  1083.       in the song position table (at offset 952-1079).
  1084.  
  1085. Each note is stored as 4 bytes, and all four notes at each position in
  1086. the pattern are stored after each other.
  1087.  
  1088. 00 -  chan1  chan2  chan3  chan4
  1089. 01 -  chan1  chan2  chan3  chan4
  1090. 02 -  chan1  chan2  chan3  chan4
  1091. etc.
  1092.  
  1093. Info for each note:
  1094.  
  1095.  _____byte 1_____   byte2_    _____byte 3_____   byte4_
  1096. /                \ /      \  /                \ /      \
  1097. 0000          0000-00000000  0000          0000-00000000
  1098.  
  1099. Upper four    12 bits for    Lower four    Effect command.
  1100. bits of sam-  note period.   bits of sam-
  1101. ple number.                  ple number.
  1102.  
  1103. Periodtable for Tuning 0, Normal
  1104.   C-1 to B-1 : 856,808,762,720,678,640,604,570,538,508,480,453
  1105.   C-2 to B-2 : 428,404,381,360,339,320,302,285,269,254,240,226
  1106.   C-3 to B-3 : 214,202,190,180,170,160,151,143,135,127,120,113
  1107.  
  1108. To determine what note to show, scan through the table until you find
  1109. the same period as the one stored in byte 1-2. Use the index to look
  1110. up in a notenames table.
  1111.  
  1112. This is the data stored in a normal song. A packed song starts with the
  1113. four letters "PACK", but i don't know how the song is packed: You can
  1114. get the source code for the cruncher/decruncher from us if you need it,
  1115. but I don't understand it; I've just ripped it from another tracker...
  1116.  
  1117. In a module, all the samples are stored right after the patterndata.
  1118. To determine where a sample starts and stops, you use the sampleinfo
  1119. structures in the beginning of the file (from offset 20). Take a look
  1120. at the mt_init routine in the playroutine, and you'll see just how it
  1121. is done.
  1122.  
  1123. Lars "ZAP" Hamre/Amiga Freelancers
  1124.  
  1125. ***********************************************************************/
  1126.  
  1127. -- 
  1128. Mark J Cox -----
  1129. Bradford, UK ---
  1130.  
  1131.  
  1132. PS: A file with even *much* more info on MOD files, compiled by Lars
  1133. Hamre, is available from ftp.cwi.nl:/pub/audio/MOD-info.  Enjoy!
  1134.  
  1135.  
  1136. FTP sites for MODs and MOD players
  1137. ----------------------------------
  1138.  
  1139. Subject: MODS AND PLAYERS!! **READ** info/where to get them
  1140. From: cjohnson@tartarus.uwa.edu.au (Christopher Johnson)
  1141. Newsgroups: alt.binaries.sounds.d
  1142. Message-ID: <1h32ivINNglu@uniwa.uwa.edu.au>
  1143. Date: 21 Dec 92 00:19:43 GMT
  1144. Organization: The University of Western Australia
  1145.  
  1146. Hello world,
  1147.  
  1148. For all those asking, here is where to get those mod players and mods.
  1149.  
  1150. SNAKE.MCS.KENT.EDU is the best site for general stuff.  look in /pub/SB-Adlib
  1151.  
  1152. Simtel-20 or archie.au(simtel mirror) in <msdos.sound>
  1153.  
  1154. for windows players ftp.cica.indiana.edu in pub/pc/win3/sound
  1155.  
  1156. here is a short list of players
  1157.  
  1158. mp or modplay   BEST OVERALL                    mp219b.zip      
  1159.         simtel and snake
  1160.  
  1161. wowii           best for vga/fast machines      wowii12b.zip    
  1162.         simtel and snake
  1163.  
  1164. trakblaster     best for compatability          trak-something  
  1165.         simtel and snake        two versions, old one for slow
  1166.         machines
  1167.  
  1168. ss              cute display(hifi)              have_sex.arj
  1169.         found on local BBS (western Australia White Ghost)
  1170.  
  1171. superpro player generally good                  ssp.zip or similar
  1172.         found on night owl 7 CD
  1173.  
  1174. player?         cute display(hifi)              player.zip or similar
  1175.         found on night owl 7 CD
  1176.  
  1177. WINDOWS
  1178.  
  1179. Winmod pro      does protracker                 wmp????.zip
  1180.         cica
  1181.  
  1182. winmod          more stable                     winmod12.zip or similar
  1183.         cica
  1184.  
  1185. Hope this helps, e-mail me if you find any more players and I will add them in for the next time mod player requests get a
  1186. little out of hand.
  1187.  
  1188. for mods ftp to wuarchive.wustl.edu and go to the amiga music directory (pub/amiga/music/ntsb ?????)  that should do you for
  1189. a while
  1190.  
  1191. see you soon
  1192.  
  1193. Chris.
  1194.  
  1195. -----------------------------------------------------------------------
  1196.  
  1197.